import request from '@/utils/request'

// 新增开票记录
export function invoiceAdd(data) {
  return request({
    url: '/logi/sys/waybill/invoice/add',
    method: 'post',
    data: data
  })
}

// 暂不开票
export function noNeed(data) {
  return request({
    url: '/logi/sys/waybill/invoice/noNeed',
    method: 'post',
    data: data
  })
}

// 恢复开票
export function recover(data) {
  return request({
    url: '/logi/sys/waybill/invoice/recover',
    method: 'post',
    data: data
  })
}

// 重新开票
export function reInvoice(data) {
  return request({
    url: '/logi/sys/waybill/invoice/reInvoice',
    method: 'post',
    data: data
  })
}

// 查询开票记录列表
export function invoiceList(data) {
  return request({
    url: '/logi/sys/waybill/invoice/list',
    method: 'post',
    data
  })
}

// 获取开票详细信息
export function invoiceDetail(id) {
  return request({
    url: '/logi/sys/waybill/invoice/' + id,
    method: 'get',
  })
}

// 发送邮箱
export function sendEmail(id,email) {
  return request({
    url: '/logi/sys/waybill/invoice/sendEmail/' + id+'/'+email,
    method: 'post'
  })
}

// 作废
export function obsolete(id) {
  return request({
    url: '/logi/sys/waybill/invoice/obsolete/' + id,
    method: 'post'
  })
}

